// pages/choose_list/choose_list.js
Page({
  data: {
    rm_list: [],
    list_value: '',
  },
  onLoad: function (query) {
    let list = JSON.parse(query.list)
    this.setData({
      images: query.images,
      rm_list: list,
      width: query.width,
      height: query.height,
      left: query.left,
      top: query.top,
      is_true: query.is_true,
      num: query.num,
    })
    // console.log(this.data.width, this.data.height, this.data.left, this.data.top, this.data.num, this.data.images)
  },
  toCompile: function (e) {
    // console.log(e.currentTarget.dataset.item)
    this.setData({
      list_value: e.currentTarget.dataset.item
    })
    let list = JSON.stringify(this.data.rm_list)
    tt.redirectTo({
      url: '../../pages/compileCard/compileCard?list_value=' + e.currentTarget.dataset.item
        + '&list=' + list
        + '&is_true=' + this.data.is_true
        + '&images=' + this.data.images
        + '&width=' + this.data.width
        + '&height=' + this.data.height
        + '&left=' + this.data.left
        + '&top=' + this.data.top
        + '&num=' + this.data.num,
    });
  },
  back() {
    wx.navigateBack({
      delta: 1
    })
  },
})